Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool that adds/sets tags for collection elements from a file #5462

Merged
merged 6 commits into from
Feb 12, 2018

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Feb 6, 2018

This tool can set or add tags from a file. I wrote this for #5457, but I think it may be useful for other applications as well.

@jmchilton
Copy link
Member

While I'm still not sold on #5457 specially, better metadata collection and tooling seems like a great idea regardless of how we use it (select tags in the tool form at runtime vs say restructure the collection using the tags).

We should catch them during upload in #5365 - but there are clearly applications for this as well.

What do you think about making that boolean a select list and adding remove specified tags as an option? I consider a bug for instance that a name tag as an element would get propagated to the mapped over collection itself and not just the mapped over collection element. Having the ability to hack around these issues might be important? Maybe that is just speculative - but having the select list at least gives us room to grow in that direction without breaking the interface.

@mvdbeek
Copy link
Member Author

mvdbeek commented Feb 6, 2018

restructure the collection using the tags

That's the next thing I was thinking about, because we may need this (if we go with something like #5365) in addition to #5365.

We should catch them during upload in #5365

That would be great, indeed!

@mvdbeek mvdbeek force-pushed the tag_collection_from_files branch from 47dc350 to e306a44 Compare February 6, 2018 15:58
@galaxybot galaxybot added this to the 18.05 milestone Feb 6, 2018
Not sure this is the right thing to do (maybe there is a better way to get an ID?), but it avoids
```
IntegrityError: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key"
DETAIL:  Key (name)=(group) already exists.
 [SQL: 'INSERT INTO tag (type, parent_id, name) VALUES (%(type)s, %(parent_id)s, %(name)s) RETURNING tag.id'] [parameters: {'parent_id': None, 'type': 0, 'name': u'group'}]
galaxy.tools.execute WARNING 2018-02-06 15:22:38,808 [p:2122,w:1,m:0] [uWSGIWorker1Core1] There was a failure executing a job for tool [__TAG_FROM_FILE__] - Error executing tool: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key"
```
@jmchilton
Copy link
Member

Very nice - looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants